package pineapple.p7;

import java.io.File;
import java.util.Date;
 
/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) throws Exception {
        File fileToChange = new File("C:/metafile.txt");
        fileToChange.createNewFile();
        Date lifetime = new Date(fileToChange.lastModified());
        System.out.println(lifetime);
        System.out.println(fileToChange.setLastModified(System.currentTimeMillis()));
        lifetime = new Date(fileToChange.lastModified());
        System.out.println(lifetime.toString());
    }
}